package Cn.Sarkar.MMS.DataBaseDefinations.Independent.Permission

import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.comment
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.intColumn
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.reference
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.unique
import Cn.Sarkar.MMS.DataBaseDefinations.Additional.Descriptions
import Cn.Sarkar.MMS.DataBaseDefinations.Additional.Names
import Cn.Sarkar.MMS.DataBaseDefinations.Independent.Applications
import Cn.Sarkar.Entities.Common.Table
import Cn.Sarkar.MMS.DataBaseDefinations.Independent.ApplicationDomains

object PermissionGroups : Table("PermissionGroup") {
    override var Comment: String = "ھوقوق گورۇپپىلىرى"
    val ApplicationDomainID = intColumn("ApplicationDomainID") reference ApplicationDomains.ID comment "ئەپ"
    val NameID = intColumn("NameID") reference Names.ID
    val DescriptionID = intColumn("DescriptionID") reference Descriptions.ID

    init {
        unique(ApplicationDomainID, NameID, DescriptionID)
    }

    override val CATEGORY: Int = 11
}
